<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxmppaylistTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_mp_pay_lists', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('nick_name', 64)->default('')->comment('微信应用名称');
            $table->string('head_img', 250)->default('')->comment('头像');
            $table->string('appid', 64)->default('')->comment('微信应用ID');
            $table->string('mch_id', 64)->default('')->comment('商户号');
            $table->string('key', 64)->default('')->comment('商户API 密钥');
            $table->string('cert_path', 128)->default('')->comment('商户平台API 证书(cert)');
            $table->string('key_path', 128)->default('')->comment('商户平台API 证书(key)');
            $table->unsignedTinyInteger('is_enable')->default('1')->comment('使用状态（1：正常，0：停用）');
            $table->unsignedTinyInteger('is_default')->default(0)->comment('是否默认');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_mp_pay_lists');
    }
}
